﻿using PivotCollectionTools.Library;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using PivotCollectionTools.Xml;
using PivotCollectionTools.Data;

namespace PivotCollectionTools.Library.Test
{
    
    
    /// <summary>
    ///This is a test class for PivotTableBuilderTest and is intended
    ///to contain all PivotTableBuilderTest Unit Tests
    ///</summary>
    [TestClass()]
    public class PivotTableBuilderTest
    {


        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


        /// <summary>
        ///A test for LastXmlRead
        ///</summary>
        [TestMethod()]
        [DeploymentItem("PivotCollectionTools.Library.dll")]
        public void LastXmlReadTest()
        {
            PivotTableBuilder_Accessor target = new PivotTableBuilder_Accessor(); // TODO: Initialize to an appropriate value
            PivotXml expected = null; // TODO: Initialize to an appropriate value
            PivotXml actual;
            target.LastXmlRead = expected;
            actual = target.LastXmlRead;
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for ReadFromXml
        ///</summary>
        [TestMethod()]
        public void ReadFromXmlTest()
        {
            PivotTableBuilder target = new PivotTableBuilder(); // TODO: Initialize to an appropriate value
            PivotTable table = null; // TODO: Initialize to an appropriate value
            string fileName = "../../../kiva.cxml";
            table = target.ReadFromXml(fileName);
            var x = table.Columns.Count;
            //Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for GetStringValue
        ///</summary>
        [TestMethod()]
        [DeploymentItem("PivotCollectionTools.Library.dll")]
        public void GetStringValueTest()
        {
            Item item = null; // TODO: Initialize to an appropriate value
            PivotTableRow dataRow = null; // TODO: Initialize to an appropriate value
            string categoryName = string.Empty; // TODO: Initialize to an appropriate value
            PivotTableBuilder_Accessor.GetStringValue(item, dataRow, categoryName);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for GetNumberValue
        ///</summary>
        [TestMethod()]
        [DeploymentItem("PivotCollectionTools.Library.dll")]
        public void GetNumberValueTest()
        {
            Item item = null; // TODO: Initialize to an appropriate value
            PivotTableRow dataRow = null; // TODO: Initialize to an appropriate value
            PivotTableCategory category = null; // TODO: Initialize to an appropriate value
            PivotTableBuilder_Accessor.GetNumberValue(item, dataRow, category);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for GetFacetValueCount
        ///</summary>
        [TestMethod()]
        [DeploymentItem("PivotCollectionTools.Library.dll")]
        public void GetFacetValueCountTest()
        {
            Item collectionItem = null; // TODO: Initialize to an appropriate value
            PivotTableCategory category = null; // TODO: Initialize to an appropriate value
            int expected = 0; // TODO: Initialize to an appropriate value
            int actual;
            actual = PivotTableBuilder_Accessor.GetFacetValueCount(collectionItem, category);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for GetDateValue
        ///</summary>
        [TestMethod()]
        [DeploymentItem("PivotCollectionTools.Library.dll")]
        public void GetDateValueTest()
        {
            Item item = null; // TODO: Initialize to an appropriate value
            PivotTableRow dataRow = null; // TODO: Initialize to an appropriate value
            string categoryName = string.Empty; // TODO: Initialize to an appropriate value
            PivotTableBuilder_Accessor.GetDateValue(item, dataRow, categoryName);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for AddItem
        ///</summary>
        [TestMethod()]
        [DeploymentItem("PivotCollectionTools.Library.dll")]
        public void AddItemTest()
        {
            PivotTable table = new PivotTable();
            Item item = null; // TODO: Initialize to an appropriate value
            PivotTableRow expected = null; // TODO: Initialize to an appropriate value
            PivotTableRow actual;
            PivotTableBuilder_Accessor.AddItem(table, item);
            //Assert.AreEqual(expected, actual);
            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for PivotTableBuilder Constructor
        ///</summary>
        [TestMethod()]
        public void PivotTableBuilderConstructorTest()
        {
            PivotTableBuilder target = new PivotTableBuilder();
            Assert.Inconclusive("TODO: Implement code to verify target");
        }
    }
}
